<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
            "http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>



<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<META name="GENERATOR" content="hevea 1.08">
<LINK rel="stylesheet" type="text/css" href="embroot.css">
<TITLE>
EXDR Data Interchange Format
</TITLE>
</HEAD>
<BODY >
<A HREF="embroot041.html"><IMG SRC ="previous_motif.gif" ALT="Previous"></A>
<A HREF="index.html"><IMG SRC ="contents_motif.gif" ALT="Up"></A>
<A HREF="embroot052.html"><IMG SRC ="next_motif.gif" ALT="Next"></A>
<HR>

<H1 CLASS="chapter"><A NAME="htoc102">Chapter&nbsp;9</A>&nbsp;&nbsp;EXDR Data Interchange Format</H1>
<A NAME="chapexdr"></A>

<BR>
<BR>
We have defined a data interchange format called EXDR for the
communication between ECL<SUP><I>i</I></SUP>PS<SUP><I>e</I></SUP> and other languages. The data types
available in this format are integer, double, string, list, nil,
structure and anonymous variable. This is intended to be the subset
of ECL<SUP><I>i</I></SUP>PS<SUP><I>e</I></SUP> types that has a meaningful mapping to many other
languages' data types. The mapping onto different languages is given
in the following table. For details of the mapping between Java
classes/interfaces and EXDR/ECL<SUP><I>i</I></SUP>PS<SUP><I>e</I></SUP> types see Section
<A HREF="embroot044.html#sec:ji-type-correspondence">8.3.1</A>.
<BLOCKQUOTE CLASS="quote">
<TABLE BORDER=1 CELLSPACING=0 CELLPADDING=1>
<TR><TD ALIGN=left NOWRAP><B>EXDR type</B></TD>
<TD ALIGN=left NOWRAP><B>ECLiPSe type</B></TD>
<TD ALIGN=left NOWRAP><B>TCL type</B></TD>
<TD ALIGN=left NOWRAP><B>Java type</B></TD>
</TR>
<TR><TD ALIGN=left NOWRAP>Integer</TD>
<TD ALIGN=left NOWRAP>integer</TD>
<TD ALIGN=left NOWRAP>int	</TD>
<TD ALIGN=left NOWRAP>	java.lang.Integer</TD>
</TR>
<TR><TD ALIGN=left NOWRAP>e.g.</TD>
<TD ALIGN=left NOWRAP>123</TD>
<TD ALIGN=left NOWRAP>123	</TD>
<TD ALIGN=left NOWRAP>	123</TD>
</TR>
<TR><TD ALIGN=left NOWRAP>Long</TD>
<TD ALIGN=left NOWRAP>integer</TD>
<TD ALIGN=left NOWRAP>string	</TD>
<TD ALIGN=left NOWRAP>	java.lang.Long</TD>
</TR>
<TR><TD ALIGN=left NOWRAP>e.g.</TD>
<TD ALIGN=left NOWRAP>5000000000</TD>
<TD ALIGN=left NOWRAP>5000000000</TD>
<TD ALIGN=left NOWRAP>	5000000000</TD>
</TR>
<TR><TD ALIGN=left NOWRAP>Double</TD>
<TD ALIGN=left NOWRAP>float</TD>
<TD ALIGN=left NOWRAP>double	</TD>
<TD ALIGN=left NOWRAP>	java.lang.Double/Float</TD>
</TR>
<TR><TD ALIGN=left NOWRAP>e.g.</TD>
<TD ALIGN=left NOWRAP>12.3</TD>
<TD ALIGN=left NOWRAP>12.3	</TD>
<TD ALIGN=left NOWRAP>	12.3</TD>
</TR>
<TR><TD ALIGN=left NOWRAP>String</TD>
<TD ALIGN=left NOWRAP>string</TD>
<TD ALIGN=left NOWRAP>string	</TD>
<TD ALIGN=left NOWRAP>	java.lang.String</TD>
</TR>
<TR><TD ALIGN=left NOWRAP>e.g.</TD>
<TD ALIGN=left NOWRAP>"abc"</TD>
<TD ALIGN=left NOWRAP>abc	</TD>
<TD ALIGN=left NOWRAP>	"abc"</TD>
</TR>
<TR><TD ALIGN=left NOWRAP>List</TD>
<TD ALIGN=left NOWRAP>./2</TD>
<TD ALIGN=left NOWRAP>list	</TD>
<TD ALIGN=left NOWRAP>	java.util.Collection</TD>
</TR>
<TR><TD ALIGN=left NOWRAP>e.g.</TD>
<TD ALIGN=left NOWRAP>[a,b,c]</TD>
<TD ALIGN=left NOWRAP>{a b c}</TD>
<TD ALIGN=left NOWRAP>	</TD>
</TR>
<TR><TD ALIGN=left NOWRAP>Nil</TD>
<TD ALIGN=left NOWRAP>[&nbsp;]/0</TD>
<TD ALIGN=left NOWRAP>empty string</TD>
<TD ALIGN=left NOWRAP>	java.util.Collection</TD>
</TR>
<TR><TD ALIGN=left NOWRAP>e.g.</TD>
<TD ALIGN=left NOWRAP>[&nbsp;]</TD>
<TD ALIGN=left NOWRAP>{} ""</TD>
<TD ALIGN=left NOWRAP>&nbsp;</TD>
</TR>
<TR><TD ALIGN=left NOWRAP>Struct</TD>
<TD ALIGN=left NOWRAP>compound</TD>
<TD ALIGN=left NOWRAP>list	</TD>
<TD ALIGN=left NOWRAP>	CompoundTerm/Atom</TD>
</TR>
<TR><TD ALIGN=left NOWRAP>e.g.</TD>
<TD ALIGN=left NOWRAP>foo(bar,3)</TD>
<TD ALIGN=left NOWRAP>{foo bar 3}</TD>
<TD ALIGN=left NOWRAP>&nbsp;</TD>
</TR>
<TR><TD ALIGN=left NOWRAP>Variable</TD>
<TD ALIGN=left NOWRAP>variable</TD>
<TD ALIGN=left NOWRAP>string	</TD>
<TD ALIGN=left NOWRAP>	null</TD>
</TR>
<TR><TD ALIGN=left NOWRAP>e.g.</TD>
<TD ALIGN=left NOWRAP>_</TD>
<TD ALIGN=left NOWRAP>_	</TD>
<TD ALIGN=left NOWRAP>	</TD>
</TR></TABLE>
</BLOCKQUOTE>
The EXDR Integer data type is a 32-bit signed integer, the EXDR Long
data type is a 64-bit signed integer, bigger ECL<SUP><I>i</I></SUP>PS<SUP><I>e</I></SUP> integers cannot
be represented.
The EXDR Variable type only allows singleton, anonymous variables,
which means that it is not possible to construct a term where a variable
occurs in several places simultaneously. The main use of these variables
is as placeholders for result arguments in remote procedure calls.<BR>
<BR>
<UL>
<LI><A HREF="embroot050.html">ECL<SUP><I>i</I></SUP>PS<SUP><I>e</I></SUP> primitives to read/write EXDR terms</A>
<LI><A HREF="embroot051.html">Serialized representation of EXDR terms</A>
</UL>

<HR>
<A HREF="embroot041.html"><IMG SRC ="previous_motif.gif" ALT="Previous"></A>
<A HREF="index.html"><IMG SRC ="contents_motif.gif" ALT="Up"></A>
<A HREF="embroot052.html"><IMG SRC ="next_motif.gif" ALT="Next"></A>
</BODY>
</HTML>
